package com.zyj.business.service.impl;

import com.zyj.business.dao.CustomerRepository;
import com.zyj.business.entity.Customer;
import com.zyj.business.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author yicky zhang
 * @create 2018-06-28 下午3:24
 * @desc
 **/
@Service
public class CustomerServiceImpl implements ICustomerService {
    @Autowired
    private CustomerRepository customerRepository;

    @Override
    public void save(Customer customer) {
        customerRepository.save(customer);
    }

    @Override
    public void update(Customer customer) {
        customerRepository.save(customer);
    }

    @Override
    public Customer getByUsername(String username) {
        return customerRepository.getByUsername(username);
    }

}
